package com.qfedu.pojo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * (User)前台用户实体类
 *
 * @author makejava
 * @since 2022-09-27 15:45:11
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Entity
@Table(name = "user")
public class User implements Serializable {
    private static final long serialVersionUID = 241660555546298211L;
    /**
     * 主键
     */
    //设置为主键
    @Id
    //设置主键自增长
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //将属性名与字段名进行映射
    @Column(name = "id")
    private Integer id;
    /**
     * 用户名
     */
    @Column(name = "user_name")
    private String userName;
    /**
     * 密码
     */
    @Column(name = "password")
    private String password;
    /**
     * 邮箱
     */
    @Column(name = "email")
    private String email;

    /**
     * 是否管理员
     */
    @Column(name = "state")
    private Integer state;

    @Column(name = "id_card")
    private String idCard;

    private String sex;

    private String tel;

    private String place;

}

